<?php
/**
 * Created by PhpStorm.
 * Author: Chengfeng
 * Email: drondyw@gmail.com
 * Date: 18-10-12
 * Time: 下午8:07
 * At MicroProfit 19F
 */

namespace MessageMap;

use MessageMap\Config\DdConf;

class Message
{
    private static $instance = null;

    private $container = [];

    public static function getInstance()
    {
        if (self::$instance === null) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    public static function init(DdConf $conf)
    {
        $ins = self::getInstance();

        $ins->container['conf'] = $conf;
    }

    /**
     * @return DdConf
     */
    public static function getConf()
    {
        return self::getInstance()->container['conf'];
    }
}
